package cn.fivestars.springcloud.order.service;


import cn.fivestars.springcloud.commons.entities.CommonResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * 基类
 *
 * @author liangchenzhou1024@163.com
 * @date 2021/3/4
 */
@Component
public class PaymentFeignFallbackServiceImpl implements PaymentFeignService {
    private static final Logger logger = LoggerFactory.getLogger(PaymentFeignFallbackServiceImpl.class);

    @Override
    public <T> CommonResult<T> getById(Long id) {
        logger.warn("===> fallback getById({})", id);
        return CommonResult.failure(999, "service error");
    }

    @Override
    public <T> CommonResult<T> timeout(Long id) {
        logger.warn("===> fallback timeout({})", id);
        return CommonResult.failure(999, "service error");
    }
}
